package com.ushine.design.design.c_behavioral_pattern.b_command.a_practice;

/**
 * 调用者
 *
 * @author yls
 */
public class Invoker {
    private Command command;

    //构造注入
    public Invoker(Command command) {
        this.command = command;
    }

    //设值注入
    public void setCommand(Command command) {
        this.command = command;
    }

    //业务方法
    public void call() {
        command.execute();
    }

}
